<?php
class defaultController{
	//属性
	protected $tempmodel;
	//方法
	public function __construct(){
		//创建model
		//加载model文件
		//项目复杂的时候 加载php文件使用绝对路径
		include("./models/defaultmodel.class.php");
		$this->tempmodel=new defaultModel("localhost:3306","root","root","boke");
	}
	public function __destruct(){

	}
	
	public function index(){
		
		$fristarray=$this->tempmodel->getallinfos("001");

		$secondarray=$this->tempmodel->getallinfos("002");

		$thirdarray=$this->tempmodel->getallinfos("003");

		$fourtharray=$this->tempmodel->getallinfos("004");

		$onearray=$this->tempmodel->getrightinfos("001");

		$twoarray=$this->tempmodel->getrightinfos("002");

		$threearray=$this->tempmodel->getrightinfos("003");

		$fourarray=$this->tempmodel->getrightinfos("004");

		$fivearray=$this->tempmodel->getrightinfos("005");

		$sixarray=$this->tempmodel->getrightinfos("006");

		$sevenarray=$this->tempmodel->getrightinfos("007");

		$eightarray=$this->tempmodel->getrightinfos("008");

		$ninearray=$this->tempmodel->getrightinfos("009");

		$tenarray=$this->tempmodel->getrightinfos("010");

		$elevenarray=$this->tempmodel->getrightinfos("011");

		$twelvearray=$this->tempmodel->getrightinfos("012");

		$thirteenarray=$this->tempmodel->getrightinfos("013");
		
		include("./views/index.html.php");
		
	}
}
?>